import pygame, sys
from pygame.locals import *

# set up pygame
pygame.init()

S_WIDTH = 650
S_HEIGHT = 480

# set up the window
windowSurface = pygame.display.set_mode((S_WIDTH, S_HEIGHT), 0, 32)
pygame.display.set_caption('ch2_6')

BLACK = (0, 0, 0)

bg = pygame.Rect(0, 0, S_WIDTH, S_HEIGHT)
bgImage = pygame.image.load('bg.bmp')

GIRL_WIDTH = 298
GIRL_HEIGHT = 329

girl = pygame.Rect(50, 20, GIRL_WIDTH, GIRL_HEIGHT)
girlImage = pygame.image.load('girl.bmp')
girlImage.set_alpha(100)

while True:
    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()

    windowSurface.fill(BLACK)
    windowSurface.blit(bgImage, bg)
    windowSurface.blit(girlImage, girl)
    pygame.display.update()
